package com.akkainaction.helloactor.message.actor.tell;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import com.akkainaction.helloactor.message.actor.tell.ServerActor;

public class TellMain {

    public static void main(String[] args) {
        ActorSystem system = ActorSystem.create("sys");
        ActorRef actorRef = system.actorOf(Props.create(ServerActor.class), "serverActor");
        //tell的返回值为void
        actorRef.tell("hello server actor", ActorRef.noSender());
        //关闭当前system，这样进程才会退出
        system.shutdown();
    }
}
